// Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
// the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
// an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.

//------------------------------------------------------------------------------
// <auto-generated>
//     This code was generated by google-apis-code-generator 1.5.1
//     C# generator version: 1.22.0
//
//     Changes to this file may cause incorrect behavior and will be lost if
//     the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------

/**
 * \brief
 *   AdSense Management API Version v1.3
 *
 * \section ApiInfo API Version Information
 *    <table>
 *      <tr><th>API
 *          <td><a href='https://developers.google.com/adsense/management/'>AdSense Management API</a>
 *      <tr><th>API Version<td>v1.3
 *      <tr><th>API Rev<td>20170320 (809)
 *      <tr><th>API Docs
 *          <td><a href='https://developers.google.com/adsense/management/'>
 *              https://developers.google.com/adsense/management/</a>
 *      <tr><th>Discovery Name<td>adsense
 *    </table>
 *
 * \section ForMoreInfo For More Information
 *
 * The complete API documentation for using AdSense Management API can be found at
 * <a href='https://developers.google.com/adsense/management/'>https://developers.google.com/adsense/management/</a>.
 *
 * For more information about the Google APIs Client Library for .NET, see
 * <a href='https://developers.google.com/api-client-library/dotnet/get_started'>
 * https://developers.google.com/api-client-library/dotnet/get_started</a>
 */

namespace Google.Apis.AdSense.v1_3
{
    /// <summary>The AdSense Service.</summary>
    public class AdSenseService : Google.Apis.Services.BaseClientService
    {
        /// <summary>The API version.</summary>
        public const string Version = "v1.3";

        /// <summary>The discovery version used to generate this service.</summary>
        public static Google.Apis.Discovery.DiscoveryVersion DiscoveryVersionUsed =
            Google.Apis.Discovery.DiscoveryVersion.Version_1_0;

        /// <summary>Constructs a new service.</summary>
        public AdSenseService() :
            this(new Google.Apis.Services.BaseClientService.Initializer()) {}

        /// <summary>Constructs a new service.</summary>
        /// <param name="initializer">The service initializer.</param>
        public AdSenseService(Google.Apis.Services.BaseClientService.Initializer initializer)
            : base(initializer)
        {
            accounts = new AccountsResource(this);
            adclients = new AdclientsResource(this);
            adunits = new AdunitsResource(this);
            alerts = new AlertsResource(this);
            customchannels = new CustomchannelsResource(this);
            metadata = new MetadataResource(this);
            reports = new ReportsResource(this);
            savedadstyles = new SavedadstylesResource(this);
            urlchannels = new UrlchannelsResource(this);
        }

        /// <summary>Gets the service supported features.</summary>
        public override System.Collections.Generic.IList<string> Features
        {
            get { return new string[0]; }
        }

        /// <summary>Gets the service name.</summary>
        public override string Name
        {
            get { return "adsense"; }
        }

        /// <summary>Gets the service base URI.</summary>
        public override string BaseUri
        {
            get { return "https://www.googleapis.com/adsense/v1.3/"; }
        }

        /// <summary>Gets the service base path.</summary>
        public override string BasePath
        {
            get { return "adsense/v1.3/"; }
        }

        /// <summary>Available OAuth 2.0 scopes for use with the AdSense Management API.</summary>
        public class Scope
        {
            /// <summary>View and manage your AdSense data</summary>
            public static string Adsense = "https://www.googleapis.com/auth/adsense";

            /// <summary>View your AdSense data</summary>
            public static string AdsenseReadonly = "https://www.googleapis.com/auth/adsense.readonly";

        }



        private readonly AccountsResource accounts;

        /// <summary>Gets the Accounts resource.</summary>
        public virtual AccountsResource Accounts
        {
            get { return accounts; }
        }

        private readonly AdclientsResource adclients;

        /// <summary>Gets the Adclients resource.</summary>
        public virtual AdclientsResource Adclients
        {
            get { return adclients; }
        }

        private readonly AdunitsResource adunits;

        /// <summary>Gets the Adunits resource.</summary>
        public virtual AdunitsResource Adunits
        {
            get { return adunits; }
        }

        private readonly AlertsResource alerts;

        /// <summary>Gets the Alerts resource.</summary>
        public virtual AlertsResource Alerts
        {
            get { return alerts; }
        }

        private readonly CustomchannelsResource customchannels;

        /// <summary>Gets the Customchannels resource.</summary>
        public virtual CustomchannelsResource Customchannels
        {
            get { return customchannels; }
        }

        private readonly MetadataResource metadata;

        /// <summary>Gets the Metadata resource.</summary>
        public virtual MetadataResource Metadata
        {
            get { return metadata; }
        }

        private readonly ReportsResource reports;

        /// <summary>Gets the Reports resource.</summary>
        public virtual ReportsResource Reports
        {
            get { return reports; }
        }

        private readonly SavedadstylesResource savedadstyles;

        /// <summary>Gets the Savedadstyles resource.</summary>
        public virtual SavedadstylesResource Savedadstyles
        {
            get { return savedadstyles; }
        }

        private readonly UrlchannelsResource urlchannels;

        /// <summary>Gets the Urlchannels resource.</summary>
        public virtual UrlchannelsResource Urlchannels
        {
            get { return urlchannels; }
        }
    }

    ///<summary>A base abstract class for AdSense requests.</summary>
    public abstract class AdSenseBaseServiceRequest<TResponse> : Google.Apis.Requests.ClientServiceRequest<TResponse>
    {
        ///<summary>Constructs a new AdSenseBaseServiceRequest instance.</summary>
        protected AdSenseBaseServiceRequest(Google.Apis.Services.IClientService service)
            : base(service)
        {
        }

        /// <summary>Data format for the response.</summary>
        /// [default: json]
        [Google.Apis.Util.RequestParameterAttribute("alt", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<AltEnum> Alt { get; set; }

        /// <summary>Data format for the response.</summary>
        public enum AltEnum
        {
            /// <summary>Responses with Content-Type of text/csv</summary>
            [Google.Apis.Util.StringValueAttribute("csv")]
            Csv,
            /// <summary>Responses with Content-Type of application/json</summary>
            [Google.Apis.Util.StringValueAttribute("json")]
            Json,
        }

        /// <summary>Selector specifying which fields to include in a partial response.</summary>
        [Google.Apis.Util.RequestParameterAttribute("fields", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Fields { get; set; }

        /// <summary>API key. Your API key identifies your project and provides you with API access, quota, and reports.
        /// Required unless you provide an OAuth 2.0 token.</summary>
        [Google.Apis.Util.RequestParameterAttribute("key", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string Key { get; set; }

        /// <summary>OAuth 2.0 token for the current user.</summary>
        [Google.Apis.Util.RequestParameterAttribute("oauth_token", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string OauthToken { get; set; }

        /// <summary>Returns response with indentations and line breaks.</summary>
        /// [default: true]
        [Google.Apis.Util.RequestParameterAttribute("prettyPrint", Google.Apis.Util.RequestParameterType.Query)]
        public virtual System.Nullable<bool> PrettyPrint { get; set; }

        /// <summary>Available to use for quota purposes for server-side applications. Can be any arbitrary string
        /// assigned to a user, but should not exceed 40 characters. Overrides userIp if both are provided.</summary>
        [Google.Apis.Util.RequestParameterAttribute("quotaUser", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string QuotaUser { get; set; }

        /// <summary>IP address of the site where the request originates. Use this if you want to enforce per-user
        /// limits.</summary>
        [Google.Apis.Util.RequestParameterAttribute("userIp", Google.Apis.Util.RequestParameterType.Query)]
        public virtual string UserIp { get; set; }

        /// <summary>Initializes AdSense parameter list.</summary>
        protected override void InitParameters()
        {
            base.InitParameters();

            RequestParameters.Add(
                "alt", new Google.Apis.Discovery.Parameter
                {
                    Name = "alt",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "json",
                    Pattern = null,
                });
            RequestParameters.Add(
                "fields", new Google.Apis.Discovery.Parameter
                {
                    Name = "fields",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "key", new Google.Apis.Discovery.Parameter
                {
                    Name = "key",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "oauth_token", new Google.Apis.Discovery.Parameter
                {
                    Name = "oauth_token",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "prettyPrint", new Google.Apis.Discovery.Parameter
                {
                    Name = "prettyPrint",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = "true",
                    Pattern = null,
                });
            RequestParameters.Add(
                "quotaUser", new Google.Apis.Discovery.Parameter
                {
                    Name = "quotaUser",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
            RequestParameters.Add(
                "userIp", new Google.Apis.Discovery.Parameter
                {
                    Name = "userIp",
                    IsRequired = false,
                    ParameterType = "query",
                    DefaultValue = null,
                    Pattern = null,
                });
        }
    }

    /// <summary>The "accounts" collection of methods.</summary>
    public class AccountsResource
    {
        private const string Resource = "accounts";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public AccountsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            adclients = new AdclientsResource(service);
            adunits = new AdunitsResource(service);
            alerts = new AlertsResource(service);
            customchannels = new CustomchannelsResource(service);
            reports = new ReportsResource(service);
            savedadstyles = new SavedadstylesResource(service);
            urlchannels = new UrlchannelsResource(service);

        }

        private readonly AdclientsResource adclients;

        /// <summary>Gets the Adclients resource.</summary>
        public virtual AdclientsResource Adclients
        {
            get { return adclients; }
        }

        /// <summary>The "adclients" collection of methods.</summary>
        public class AdclientsResource
        {
            private const string Resource = "adclients";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public AdclientsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>List all ad clients in the specified account.</summary>
            /// <param name="accountId">Account for which to list ad clients.</param>
            public virtual ListRequest List(string accountId)
            {
                return new ListRequest(service, accountId);
            }

            /// <summary>List all ad clients in the specified account.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdClients>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string accountId)
                    : base(service)
                {
                    AccountId = accountId;
                    InitParameters();
                }


                /// <summary>Account for which to list ad clients.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>The maximum number of ad clients to include in the response, used for paging.</summary>
                /// [minimum: 0]
                /// [maximum: 10000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>A continuation token, used to page through ad clients. To retrieve the next page, set this
                /// parameter to the value of "nextPageToken" from the previous response.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
        private readonly AdunitsResource adunits;

        /// <summary>Gets the Adunits resource.</summary>
        public virtual AdunitsResource Adunits
        {
            get { return adunits; }
        }

        /// <summary>The "adunits" collection of methods.</summary>
        public class AdunitsResource
        {
            private const string Resource = "adunits";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public AdunitsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;
                customchannels = new CustomchannelsResource(service);

            }

            private readonly CustomchannelsResource customchannels;

            /// <summary>Gets the Customchannels resource.</summary>
            public virtual CustomchannelsResource Customchannels
            {
                get { return customchannels; }
            }

            /// <summary>The "customchannels" collection of methods.</summary>
            public class CustomchannelsResource
            {
                private const string Resource = "customchannels";

                /// <summary>The service which this resource belongs to.</summary>
                private readonly Google.Apis.Services.IClientService service;

                /// <summary>Constructs a new resource.</summary>
                public CustomchannelsResource(Google.Apis.Services.IClientService service)
                {
                    this.service = service;

                }


                /// <summary>List all custom channels which the specified ad unit belongs to.</summary>
                /// <param name="accountId">Account to which the ad client belongs.</param>
                /// <param name="adClientId">Ad client
                /// which contains the ad unit.</param>
                /// <param name="adUnitId">Ad unit for which to list custom
                /// channels.</param>
                public virtual ListRequest List(string accountId, string adClientId, string adUnitId)
                {
                    return new ListRequest(service, accountId, adClientId, adUnitId);
                }

                /// <summary>List all custom channels which the specified ad unit belongs to.</summary>
                public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.CustomChannels>
                {
                    /// <summary>Constructs a new List request.</summary>
                    public ListRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId, string adUnitId)
                        : base(service)
                    {
                        AccountId = accountId;
                        AdClientId = adClientId;
                        AdUnitId = adUnitId;
                        InitParameters();
                    }


                    /// <summary>Account to which the ad client belongs.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string AccountId { get; private set; }

                    /// <summary>Ad client which contains the ad unit.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string AdClientId { get; private set; }

                    /// <summary>Ad unit for which to list custom channels.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string AdUnitId { get; private set; }

                    /// <summary>The maximum number of custom channels to include in the response, used for
                    /// paging.</summary>
                    /// [minimum: 0]
                    /// [maximum: 10000]
                    [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual System.Nullable<int> MaxResults { get; set; }

                    /// <summary>A continuation token, used to page through custom channels. To retrieve the next page,
                    /// set this parameter to the value of "nextPageToken" from the previous response.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual string PageToken { get; set; }


                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "list"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "GET"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/customchannels"; }
                    }

                    /// <summary>Initializes List parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "accountId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "accountId",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "adClientId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "adClientId",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "adUnitId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "adUnitId",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "maxResults", new Google.Apis.Discovery.Parameter
                            {
                                Name = "maxResults",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "pageToken", new Google.Apis.Discovery.Parameter
                            {
                                Name = "pageToken",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                    }

                }
            }

            /// <summary>Gets the specified ad unit in the specified ad client for the specified account.</summary>
            /// <param name="accountId">Account to which the ad client belongs.</param>
            /// <param name="adClientId">Ad client
            /// for which to get the ad unit.</param>
            /// <param name="adUnitId">Ad unit to retrieve.</param>
            public virtual GetRequest Get(string accountId, string adClientId, string adUnitId)
            {
                return new GetRequest(service, accountId, adClientId, adUnitId);
            }

            /// <summary>Gets the specified ad unit in the specified ad client for the specified account.</summary>
            public class GetRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdUnit>
            {
                /// <summary>Constructs a new Get request.</summary>
                public GetRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId, string adUnitId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    AdUnitId = adUnitId;
                    InitParameters();
                }


                /// <summary>Account to which the ad client belongs.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>Ad client for which to get the ad unit.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// <summary>Ad unit to retrieve.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdUnitId { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}"; }
                }

                /// <summary>Initializes Get parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adUnitId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adUnitId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>Get ad code for the specified ad unit.</summary>
            /// <param name="accountId">Account which contains the ad client.</param>
            /// <param name="adClientId">Ad client
            /// with contains the ad unit.</param>
            /// <param name="adUnitId">Ad unit to get the code for.</param>
            public virtual GetAdCodeRequest GetAdCode(string accountId, string adClientId, string adUnitId)
            {
                return new GetAdCodeRequest(service, accountId, adClientId, adUnitId);
            }

            /// <summary>Get ad code for the specified ad unit.</summary>
            public class GetAdCodeRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdCode>
            {
                /// <summary>Constructs a new GetAdCode request.</summary>
                public GetAdCodeRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId, string adUnitId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    AdUnitId = adUnitId;
                    InitParameters();
                }


                /// <summary>Account which contains the ad client.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>Ad client with contains the ad unit.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// <summary>Ad unit to get the code for.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdUnitId { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "getAdCode"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits/{adUnitId}/adcode"; }
                }

                /// <summary>Initializes GetAdCode parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adUnitId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adUnitId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>List all ad units in the specified ad client for the specified account.</summary>
            /// <param name="accountId">Account to which the ad client belongs.</param>
            /// <param name="adClientId">Ad client
            /// for which to list ad units.</param>
            public virtual ListRequest List(string accountId, string adClientId)
            {
                return new ListRequest(service, accountId, adClientId);
            }

            /// <summary>List all ad units in the specified ad client for the specified account.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdUnits>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    InitParameters();
                }


                /// <summary>Account to which the ad client belongs.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>Ad client for which to list ad units.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// <summary>Whether to include inactive ad units. Default: true.</summary>
                [Google.Apis.Util.RequestParameterAttribute("includeInactive", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<bool> IncludeInactive { get; set; }

                /// <summary>The maximum number of ad units to include in the response, used for paging.</summary>
                /// [minimum: 0]
                /// [maximum: 10000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>A continuation token, used to page through ad units. To retrieve the next page, set this
                /// parameter to the value of "nextPageToken" from the previous response.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/adunits"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "includeInactive", new Google.Apis.Discovery.Parameter
                        {
                            Name = "includeInactive",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
        private readonly AlertsResource alerts;

        /// <summary>Gets the Alerts resource.</summary>
        public virtual AlertsResource Alerts
        {
            get { return alerts; }
        }

        /// <summary>The "alerts" collection of methods.</summary>
        public class AlertsResource
        {
            private const string Resource = "alerts";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public AlertsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>List the alerts for the specified AdSense account.</summary>
            /// <param name="accountId">Account for which to retrieve the alerts.</param>
            public virtual ListRequest List(string accountId)
            {
                return new ListRequest(service, accountId);
            }

            /// <summary>List the alerts for the specified AdSense account.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.Alerts>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string accountId)
                    : base(service)
                {
                    AccountId = accountId;
                    InitParameters();
                }


                /// <summary>Account for which to retrieve the alerts.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>The locale to use for translating alert messages. The account locale will be used if this
                /// is not supplied. The AdSense default (English) will be used if the supplied locale is invalid or
                /// unsupported.</summary>
                [Google.Apis.Util.RequestParameterAttribute("locale", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string Locale { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/alerts"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "locale", new Google.Apis.Discovery.Parameter
                        {
                            Name = "locale",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
        private readonly CustomchannelsResource customchannels;

        /// <summary>Gets the Customchannels resource.</summary>
        public virtual CustomchannelsResource Customchannels
        {
            get { return customchannels; }
        }

        /// <summary>The "customchannels" collection of methods.</summary>
        public class CustomchannelsResource
        {
            private const string Resource = "customchannels";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public CustomchannelsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;
                adunits = new AdunitsResource(service);

            }

            private readonly AdunitsResource adunits;

            /// <summary>Gets the Adunits resource.</summary>
            public virtual AdunitsResource Adunits
            {
                get { return adunits; }
            }

            /// <summary>The "adunits" collection of methods.</summary>
            public class AdunitsResource
            {
                private const string Resource = "adunits";

                /// <summary>The service which this resource belongs to.</summary>
                private readonly Google.Apis.Services.IClientService service;

                /// <summary>Constructs a new resource.</summary>
                public AdunitsResource(Google.Apis.Services.IClientService service)
                {
                    this.service = service;

                }


                /// <summary>List all ad units in the specified custom channel.</summary>
                /// <param name="accountId">Account to which the ad client belongs.</param>
                /// <param name="adClientId">Ad client
                /// which contains the custom channel.</param>
                /// <param name="customChannelId">Custom channel for which to list ad
                /// units.</param>
                public virtual ListRequest List(string accountId, string adClientId, string customChannelId)
                {
                    return new ListRequest(service, accountId, adClientId, customChannelId);
                }

                /// <summary>List all ad units in the specified custom channel.</summary>
                public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdUnits>
                {
                    /// <summary>Constructs a new List request.</summary>
                    public ListRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId, string customChannelId)
                        : base(service)
                    {
                        AccountId = accountId;
                        AdClientId = adClientId;
                        CustomChannelId = customChannelId;
                        InitParameters();
                    }


                    /// <summary>Account to which the ad client belongs.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string AccountId { get; private set; }

                    /// <summary>Ad client which contains the custom channel.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string AdClientId { get; private set; }

                    /// <summary>Custom channel for which to list ad units.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("customChannelId", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string CustomChannelId { get; private set; }

                    /// <summary>Whether to include inactive ad units. Default: true.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("includeInactive", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual System.Nullable<bool> IncludeInactive { get; set; }

                    /// <summary>The maximum number of ad units to include in the response, used for paging.</summary>
                    /// [minimum: 0]
                    /// [maximum: 10000]
                    [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual System.Nullable<int> MaxResults { get; set; }

                    /// <summary>A continuation token, used to page through ad units. To retrieve the next page, set
                    /// this parameter to the value of "nextPageToken" from the previous response.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual string PageToken { get; set; }


                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "list"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "GET"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}/adunits"; }
                    }

                    /// <summary>Initializes List parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "accountId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "accountId",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "adClientId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "adClientId",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "customChannelId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "customChannelId",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "includeInactive", new Google.Apis.Discovery.Parameter
                            {
                                Name = "includeInactive",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "maxResults", new Google.Apis.Discovery.Parameter
                            {
                                Name = "maxResults",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "pageToken", new Google.Apis.Discovery.Parameter
                            {
                                Name = "pageToken",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                    }

                }
            }

            /// <summary>Get the specified custom channel from the specified ad client for the specified
            /// account.</summary>
            /// <param name="accountId">Account to which the ad client belongs.</param>
            /// <param name="adClientId">Ad client
            /// which contains the custom channel.</param>
            /// <param name="customChannelId">Custom channel to
            /// retrieve.</param>
            public virtual GetRequest Get(string accountId, string adClientId, string customChannelId)
            {
                return new GetRequest(service, accountId, adClientId, customChannelId);
            }

            /// <summary>Get the specified custom channel from the specified ad client for the specified
            /// account.</summary>
            public class GetRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.CustomChannel>
            {
                /// <summary>Constructs a new Get request.</summary>
                public GetRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId, string customChannelId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    CustomChannelId = customChannelId;
                    InitParameters();
                }


                /// <summary>Account to which the ad client belongs.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>Ad client which contains the custom channel.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// <summary>Custom channel to retrieve.</summary>
                [Google.Apis.Util.RequestParameterAttribute("customChannelId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string CustomChannelId { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/customchannels/{customChannelId}"; }
                }

                /// <summary>Initializes Get parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "customChannelId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "customChannelId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>List all custom channels in the specified ad client for the specified account.</summary>
            /// <param name="accountId">Account to which the ad client belongs.</param>
            /// <param name="adClientId">Ad client
            /// for which to list custom channels.</param>
            public virtual ListRequest List(string accountId, string adClientId)
            {
                return new ListRequest(service, accountId, adClientId);
            }

            /// <summary>List all custom channels in the specified ad client for the specified account.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.CustomChannels>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    InitParameters();
                }


                /// <summary>Account to which the ad client belongs.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>Ad client for which to list custom channels.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// <summary>The maximum number of custom channels to include in the response, used for
                /// paging.</summary>
                /// [minimum: 0]
                /// [maximum: 10000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>A continuation token, used to page through custom channels. To retrieve the next page, set
                /// this parameter to the value of "nextPageToken" from the previous response.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/customchannels"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
        private readonly ReportsResource reports;

        /// <summary>Gets the Reports resource.</summary>
        public virtual ReportsResource Reports
        {
            get { return reports; }
        }

        /// <summary>The "reports" collection of methods.</summary>
        public class ReportsResource
        {
            private const string Resource = "reports";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public ReportsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;
                saved = new SavedResource(service);

            }

            private readonly SavedResource saved;

            /// <summary>Gets the Saved resource.</summary>
            public virtual SavedResource Saved
            {
                get { return saved; }
            }

            /// <summary>The "saved" collection of methods.</summary>
            public class SavedResource
            {
                private const string Resource = "saved";

                /// <summary>The service which this resource belongs to.</summary>
                private readonly Google.Apis.Services.IClientService service;

                /// <summary>Constructs a new resource.</summary>
                public SavedResource(Google.Apis.Services.IClientService service)
                {
                    this.service = service;

                }


                /// <summary>Generate an AdSense report based on the saved report ID sent in the query
                /// parameters.</summary>
                /// <param name="accountId">Account to which the saved reports belong.</param>
                /// <param name="savedReportId">The
                /// saved report to retrieve.</param>
                public virtual GenerateRequest Generate(string accountId, string savedReportId)
                {
                    return new GenerateRequest(service, accountId, savedReportId);
                }

                /// <summary>Generate an AdSense report based on the saved report ID sent in the query
                /// parameters.</summary>
                public class GenerateRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdsenseReportsGenerateResponse>
                {
                    /// <summary>Constructs a new Generate request.</summary>
                    public GenerateRequest(Google.Apis.Services.IClientService service, string accountId, string savedReportId)
                        : base(service)
                    {
                        AccountId = accountId;
                        SavedReportId = savedReportId;
                        InitParameters();
                    }


                    /// <summary>Account to which the saved reports belong.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string AccountId { get; private set; }

                    /// <summary>The saved report to retrieve.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("savedReportId", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string SavedReportId { get; private set; }

                    /// <summary>Optional locale to use for translating report output to a local language. Defaults to
                    /// "en_US" if not specified.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("locale", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual string Locale { get; set; }

                    /// <summary>The maximum number of rows of report data to return.</summary>
                    /// [minimum: 0]
                    /// [maximum: 50000]
                    [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual System.Nullable<int> MaxResults { get; set; }

                    /// <summary>Index of the first row of report data to return.</summary>
                    /// [minimum: 0]
                    /// [maximum: 5000]
                    [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual System.Nullable<int> StartIndex { get; set; }


                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "generate"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "GET"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "accounts/{accountId}/reports/{savedReportId}"; }
                    }

                    /// <summary>Initializes Generate parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "accountId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "accountId",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "savedReportId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "savedReportId",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "locale", new Google.Apis.Discovery.Parameter
                            {
                                Name = "locale",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = @"[a-zA-Z_]+",
                            });
                        RequestParameters.Add(
                            "maxResults", new Google.Apis.Discovery.Parameter
                            {
                                Name = "maxResults",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "startIndex", new Google.Apis.Discovery.Parameter
                            {
                                Name = "startIndex",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                    }

                }

                /// <summary>List all saved reports in the specified AdSense account.</summary>
                /// <param name="accountId">Account to which the saved reports belong.</param>
                public virtual ListRequest List(string accountId)
                {
                    return new ListRequest(service, accountId);
                }

                /// <summary>List all saved reports in the specified AdSense account.</summary>
                public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.SavedReports>
                {
                    /// <summary>Constructs a new List request.</summary>
                    public ListRequest(Google.Apis.Services.IClientService service, string accountId)
                        : base(service)
                    {
                        AccountId = accountId;
                        InitParameters();
                    }


                    /// <summary>Account to which the saved reports belong.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                    public virtual string AccountId { get; private set; }

                    /// <summary>The maximum number of saved reports to include in the response, used for
                    /// paging.</summary>
                    /// [minimum: 0]
                    /// [maximum: 100]
                    [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual System.Nullable<int> MaxResults { get; set; }

                    /// <summary>A continuation token, used to page through saved reports. To retrieve the next page,
                    /// set this parameter to the value of "nextPageToken" from the previous response.</summary>
                    [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                    public virtual string PageToken { get; set; }


                    ///<summary>Gets the method name.</summary>
                    public override string MethodName
                    {
                        get { return "list"; }
                    }

                    ///<summary>Gets the HTTP method.</summary>
                    public override string HttpMethod
                    {
                        get { return "GET"; }
                    }

                    ///<summary>Gets the REST path.</summary>
                    public override string RestPath
                    {
                        get { return "accounts/{accountId}/reports/saved"; }
                    }

                    /// <summary>Initializes List parameter list.</summary>
                    protected override void InitParameters()
                    {
                        base.InitParameters();

                        RequestParameters.Add(
                            "accountId", new Google.Apis.Discovery.Parameter
                            {
                                Name = "accountId",
                                IsRequired = true,
                                ParameterType = "path",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "maxResults", new Google.Apis.Discovery.Parameter
                            {
                                Name = "maxResults",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                        RequestParameters.Add(
                            "pageToken", new Google.Apis.Discovery.Parameter
                            {
                                Name = "pageToken",
                                IsRequired = false,
                                ParameterType = "query",
                                DefaultValue = null,
                                Pattern = null,
                            });
                    }

                }
            }

            /// <summary>Generate an AdSense report based on the report request sent in the query parameters. Returns
            /// the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.</summary>
            /// <param name="accountId">Account upon which to report.</param>
            /// <param name="startDate">Start of the date
            /// range to report on in "YYYY-MM-DD" format, inclusive.</param>
            /// <param name="endDate">End of the date range to
            /// report on in "YYYY-MM-DD" format, inclusive.</param>
            public virtual GenerateRequest Generate(string accountId, string startDate, string endDate)
            {
                return new GenerateRequest(service, accountId, startDate, endDate);
            }

            /// <summary>Generate an AdSense report based on the report request sent in the query parameters. Returns
            /// the result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.</summary>
            public class GenerateRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdsenseReportsGenerateResponse>
            {
                /// <summary>Constructs a new Generate request.</summary>
                public GenerateRequest(Google.Apis.Services.IClientService service, string accountId, string startDate, string endDate)
                    : base(service)
                {
                    AccountId = accountId;
                    StartDate = startDate;
                    EndDate = endDate;
                    MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                    InitParameters();
                }


                /// <summary>Account upon which to report.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>Start of the date range to report on in "YYYY-MM-DD" format, inclusive.</summary>
                [Google.Apis.Util.RequestParameterAttribute("startDate", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string StartDate { get; private set; }

                /// <summary>End of the date range to report on in "YYYY-MM-DD" format, inclusive.</summary>
                [Google.Apis.Util.RequestParameterAttribute("endDate", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string EndDate { get; private set; }

                /// <summary>Optional currency to use when reporting on monetary metrics. Defaults to the account's
                /// currency if not set.</summary>
                [Google.Apis.Util.RequestParameterAttribute("currency", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string Currency { get; set; }

                /// <summary>Dimensions to base the report on.</summary>
                [Google.Apis.Util.RequestParameterAttribute("dimension", Google.Apis.Util.RequestParameterType.Query)]
                public virtual Google.Apis.Util.Repeatable<string> Dimension { get; set; }

                /// <summary>Filters to be run on the report.</summary>
                [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
                public virtual Google.Apis.Util.Repeatable<string> Filter { get; set; }

                /// <summary>Optional locale to use for translating report output to a local language. Defaults to
                /// "en_US" if not specified.</summary>
                [Google.Apis.Util.RequestParameterAttribute("locale", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string Locale { get; set; }

                /// <summary>The maximum number of rows of report data to return.</summary>
                /// [minimum: 0]
                /// [maximum: 50000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>Numeric columns to include in the report.</summary>
                [Google.Apis.Util.RequestParameterAttribute("metric", Google.Apis.Util.RequestParameterType.Query)]
                public virtual Google.Apis.Util.Repeatable<string> Metric { get; set; }

                /// <summary>The name of a dimension or metric to sort the resulting report on, optionally prefixed with
                /// "+" to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted
                /// ascending.</summary>
                [Google.Apis.Util.RequestParameterAttribute("sort", Google.Apis.Util.RequestParameterType.Query)]
                public virtual Google.Apis.Util.Repeatable<string> Sort { get; set; }

                /// <summary>Index of the first row of report data to return.</summary>
                /// [minimum: 0]
                /// [maximum: 5000]
                [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> StartIndex { get; set; }

                /// <summary>Whether the report should be generated in the AdSense account's local timezone. If false
                /// default PST/PDT timezone will be used.</summary>
                [Google.Apis.Util.RequestParameterAttribute("useTimezoneReporting", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<bool> UseTimezoneReporting { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "generate"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/reports"; }
                }

                /// <summary>Initializes Generate parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "startDate", new Google.Apis.Discovery.Parameter
                        {
                            Name = "startDate",
                            IsRequired = true,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)",
                        });
                    RequestParameters.Add(
                        "endDate", new Google.Apis.Discovery.Parameter
                        {
                            Name = "endDate",
                            IsRequired = true,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)",
                        });
                    RequestParameters.Add(
                        "currency", new Google.Apis.Discovery.Parameter
                        {
                            Name = "currency",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z]+",
                        });
                    RequestParameters.Add(
                        "dimension", new Google.Apis.Discovery.Parameter
                        {
                            Name = "dimension",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z_]+",
                        });
                    RequestParameters.Add(
                        "filter", new Google.Apis.Discovery.Parameter
                        {
                            Name = "filter",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z_]+(==|=@).+",
                        });
                    RequestParameters.Add(
                        "locale", new Google.Apis.Discovery.Parameter
                        {
                            Name = "locale",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z_]+",
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "metric", new Google.Apis.Discovery.Parameter
                        {
                            Name = "metric",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z_]+",
                        });
                    RequestParameters.Add(
                        "sort", new Google.Apis.Discovery.Parameter
                        {
                            Name = "sort",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"(\+|-)?[a-zA-Z_]+",
                        });
                    RequestParameters.Add(
                        "startIndex", new Google.Apis.Discovery.Parameter
                        {
                            Name = "startIndex",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "useTimezoneReporting", new Google.Apis.Discovery.Parameter
                        {
                            Name = "useTimezoneReporting",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

                /// <summary>Gets the media downloader.</summary>
                public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

                /// <summary>Synchronously download the media into the given stream.</summary>
                public virtual void Download(System.IO.Stream stream)
                {
                    MediaDownloader.Download(this.GenerateRequestUri(), stream);
                }

                /// <summary>Asynchronously download the media into the given stream.</summary>
                public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
                {
                    return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
                }

                /// <summary>Asynchronously download the media into the given stream.</summary>
                public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                    System.Threading.CancellationToken cancellationToken)
                {
                    return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
                }

            }
        }
        private readonly SavedadstylesResource savedadstyles;

        /// <summary>Gets the Savedadstyles resource.</summary>
        public virtual SavedadstylesResource Savedadstyles
        {
            get { return savedadstyles; }
        }

        /// <summary>The "savedadstyles" collection of methods.</summary>
        public class SavedadstylesResource
        {
            private const string Resource = "savedadstyles";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public SavedadstylesResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>List a specific saved ad style for the specified account.</summary>
            /// <param name="accountId">Account for which to get the saved ad style.</param>
            /// <param
            /// name="savedAdStyleId">Saved ad style to retrieve.</param>
            public virtual GetRequest Get(string accountId, string savedAdStyleId)
            {
                return new GetRequest(service, accountId, savedAdStyleId);
            }

            /// <summary>List a specific saved ad style for the specified account.</summary>
            public class GetRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.SavedAdStyle>
            {
                /// <summary>Constructs a new Get request.</summary>
                public GetRequest(Google.Apis.Services.IClientService service, string accountId, string savedAdStyleId)
                    : base(service)
                {
                    AccountId = accountId;
                    SavedAdStyleId = savedAdStyleId;
                    InitParameters();
                }


                /// <summary>Account for which to get the saved ad style.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>Saved ad style to retrieve.</summary>
                [Google.Apis.Util.RequestParameterAttribute("savedAdStyleId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string SavedAdStyleId { get; private set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "get"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/savedadstyles/{savedAdStyleId}"; }
                }

                /// <summary>Initializes Get parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "savedAdStyleId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "savedAdStyleId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>List all saved ad styles in the specified account.</summary>
            /// <param name="accountId">Account for which to list saved ad styles.</param>
            public virtual ListRequest List(string accountId)
            {
                return new ListRequest(service, accountId);
            }

            /// <summary>List all saved ad styles in the specified account.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.SavedAdStyles>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string accountId)
                    : base(service)
                {
                    AccountId = accountId;
                    InitParameters();
                }


                /// <summary>Account for which to list saved ad styles.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>The maximum number of saved ad styles to include in the response, used for
                /// paging.</summary>
                /// [minimum: 0]
                /// [maximum: 10000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>A continuation token, used to page through saved ad styles. To retrieve the next page, set
                /// this parameter to the value of "nextPageToken" from the previous response.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/savedadstyles"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }
        private readonly UrlchannelsResource urlchannels;

        /// <summary>Gets the Urlchannels resource.</summary>
        public virtual UrlchannelsResource Urlchannels
        {
            get { return urlchannels; }
        }

        /// <summary>The "urlchannels" collection of methods.</summary>
        public class UrlchannelsResource
        {
            private const string Resource = "urlchannels";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public UrlchannelsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>List all URL channels in the specified ad client for the specified account.</summary>
            /// <param name="accountId">Account to which the ad client belongs.</param>
            /// <param name="adClientId">Ad client
            /// for which to list URL channels.</param>
            public virtual ListRequest List(string accountId, string adClientId)
            {
                return new ListRequest(service, accountId, adClientId);
            }

            /// <summary>List all URL channels in the specified ad client for the specified account.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.UrlChannels>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string accountId, string adClientId)
                    : base(service)
                {
                    AccountId = accountId;
                    AdClientId = adClientId;
                    InitParameters();
                }


                /// <summary>Account to which the ad client belongs.</summary>
                [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AccountId { get; private set; }

                /// <summary>Ad client for which to list URL channels.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// <summary>The maximum number of URL channels to include in the response, used for paging.</summary>
                /// [minimum: 0]
                /// [maximum: 10000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>A continuation token, used to page through URL channels. To retrieve the next page, set
                /// this parameter to the value of "nextPageToken" from the previous response.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "accounts/{accountId}/adclients/{adClientId}/urlchannels"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "accountId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "accountId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }

        /// <summary>Get information about the selected AdSense account.</summary>
        /// <param name="accountId">Account to get information about.</param>
        public virtual GetRequest Get(string accountId)
        {
            return new GetRequest(service, accountId);
        }

        /// <summary>Get information about the selected AdSense account.</summary>
        public class GetRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.Account>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string accountId)
                : base(service)
            {
                AccountId = accountId;
                InitParameters();
            }


            /// <summary>Account to get information about.</summary>
            [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AccountId { get; private set; }

            /// <summary>Whether the tree of sub accounts should be returned.</summary>
            [Google.Apis.Util.RequestParameterAttribute("tree", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> Tree { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "accounts/{accountId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "accountId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "accountId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "tree", new Google.Apis.Discovery.Parameter
                    {
                        Name = "tree",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>List all accounts available to this AdSense account.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>List all accounts available to this AdSense account.</summary>
        public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.Accounts>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>The maximum number of accounts to include in the response, used for paging.</summary>
            /// [minimum: 0]
            /// [maximum: 10000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>A continuation token, used to page through accounts. To retrieve the next page, set this
            /// parameter to the value of "nextPageToken" from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "accounts"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "adclients" collection of methods.</summary>
    public class AdclientsResource
    {
        private const string Resource = "adclients";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public AdclientsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>List all ad clients in this AdSense account.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>List all ad clients in this AdSense account.</summary>
        public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdClients>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>The maximum number of ad clients to include in the response, used for paging.</summary>
            /// [minimum: 0]
            /// [maximum: 10000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>A continuation token, used to page through ad clients. To retrieve the next page, set this
            /// parameter to the value of "nextPageToken" from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "adclients"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "adunits" collection of methods.</summary>
    public class AdunitsResource
    {
        private const string Resource = "adunits";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public AdunitsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            customchannels = new CustomchannelsResource(service);

        }

        private readonly CustomchannelsResource customchannels;

        /// <summary>Gets the Customchannels resource.</summary>
        public virtual CustomchannelsResource Customchannels
        {
            get { return customchannels; }
        }

        /// <summary>The "customchannels" collection of methods.</summary>
        public class CustomchannelsResource
        {
            private const string Resource = "customchannels";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public CustomchannelsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>List all custom channels which the specified ad unit belongs to.</summary>
            /// <param name="adClientId">Ad client which contains the ad unit.</param>
            /// <param name="adUnitId">Ad unit for
            /// which to list custom channels.</param>
            public virtual ListRequest List(string adClientId, string adUnitId)
            {
                return new ListRequest(service, adClientId, adUnitId);
            }

            /// <summary>List all custom channels which the specified ad unit belongs to.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.CustomChannels>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string adClientId, string adUnitId)
                    : base(service)
                {
                    AdClientId = adClientId;
                    AdUnitId = adUnitId;
                    InitParameters();
                }


                /// <summary>Ad client which contains the ad unit.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// <summary>Ad unit for which to list custom channels.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdUnitId { get; private set; }

                /// <summary>The maximum number of custom channels to include in the response, used for
                /// paging.</summary>
                /// [minimum: 0]
                /// [maximum: 10000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>A continuation token, used to page through custom channels. To retrieve the next page, set
                /// this parameter to the value of "nextPageToken" from the previous response.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "adclients/{adClientId}/adunits/{adUnitId}/customchannels"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "adUnitId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adUnitId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }

        /// <summary>Gets the specified ad unit in the specified ad client.</summary>
        /// <param name="adClientId">Ad client for which to get the ad unit.</param>
        /// <param name="adUnitId">Ad unit to
        /// retrieve.</param>
        public virtual GetRequest Get(string adClientId, string adUnitId)
        {
            return new GetRequest(service, adClientId, adUnitId);
        }

        /// <summary>Gets the specified ad unit in the specified ad client.</summary>
        public class GetRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdUnit>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string adClientId, string adUnitId)
                : base(service)
            {
                AdClientId = adClientId;
                AdUnitId = adUnitId;
                InitParameters();
            }


            /// <summary>Ad client for which to get the ad unit.</summary>
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// <summary>Ad unit to retrieve.</summary>
            [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdUnitId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "adclients/{adClientId}/adunits/{adUnitId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "adUnitId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adUnitId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>Get ad code for the specified ad unit.</summary>
        /// <param name="adClientId">Ad client with contains the ad unit.</param>
        /// <param name="adUnitId">Ad unit to get
        /// the code for.</param>
        public virtual GetAdCodeRequest GetAdCode(string adClientId, string adUnitId)
        {
            return new GetAdCodeRequest(service, adClientId, adUnitId);
        }

        /// <summary>Get ad code for the specified ad unit.</summary>
        public class GetAdCodeRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdCode>
        {
            /// <summary>Constructs a new GetAdCode request.</summary>
            public GetAdCodeRequest(Google.Apis.Services.IClientService service, string adClientId, string adUnitId)
                : base(service)
            {
                AdClientId = adClientId;
                AdUnitId = adUnitId;
                InitParameters();
            }


            /// <summary>Ad client with contains the ad unit.</summary>
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// <summary>Ad unit to get the code for.</summary>
            [Google.Apis.Util.RequestParameterAttribute("adUnitId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdUnitId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "getAdCode"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "adclients/{adClientId}/adunits/{adUnitId}/adcode"; }
            }

            /// <summary>Initializes GetAdCode parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "adUnitId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adUnitId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>List all ad units in the specified ad client for this AdSense account.</summary>
        /// <param name="adClientId">Ad client for which to list ad units.</param>
        public virtual ListRequest List(string adClientId)
        {
            return new ListRequest(service, adClientId);
        }

        /// <summary>List all ad units in the specified ad client for this AdSense account.</summary>
        public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdUnits>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string adClientId)
                : base(service)
            {
                AdClientId = adClientId;
                InitParameters();
            }


            /// <summary>Ad client for which to list ad units.</summary>
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// <summary>Whether to include inactive ad units. Default: true.</summary>
            [Google.Apis.Util.RequestParameterAttribute("includeInactive", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> IncludeInactive { get; set; }

            /// <summary>The maximum number of ad units to include in the response, used for paging.</summary>
            /// [minimum: 0]
            /// [maximum: 10000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>A continuation token, used to page through ad units. To retrieve the next page, set this
            /// parameter to the value of "nextPageToken" from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "adclients/{adClientId}/adunits"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "includeInactive", new Google.Apis.Discovery.Parameter
                    {
                        Name = "includeInactive",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "alerts" collection of methods.</summary>
    public class AlertsResource
    {
        private const string Resource = "alerts";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public AlertsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>List the alerts for this AdSense account.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>List the alerts for this AdSense account.</summary>
        public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.Alerts>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>The locale to use for translating alert messages. The account locale will be used if this is
            /// not supplied. The AdSense default (English) will be used if the supplied locale is invalid or
            /// unsupported.</summary>
            [Google.Apis.Util.RequestParameterAttribute("locale", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Locale { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "alerts"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "locale", new Google.Apis.Discovery.Parameter
                    {
                        Name = "locale",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "customchannels" collection of methods.</summary>
    public class CustomchannelsResource
    {
        private const string Resource = "customchannels";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public CustomchannelsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            adunits = new AdunitsResource(service);

        }

        private readonly AdunitsResource adunits;

        /// <summary>Gets the Adunits resource.</summary>
        public virtual AdunitsResource Adunits
        {
            get { return adunits; }
        }

        /// <summary>The "adunits" collection of methods.</summary>
        public class AdunitsResource
        {
            private const string Resource = "adunits";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public AdunitsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>List all ad units in the specified custom channel.</summary>
            /// <param name="adClientId">Ad client which contains the custom channel.</param>
            /// <param
            /// name="customChannelId">Custom channel for which to list ad units.</param>
            public virtual ListRequest List(string adClientId, string customChannelId)
            {
                return new ListRequest(service, adClientId, customChannelId);
            }

            /// <summary>List all ad units in the specified custom channel.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdUnits>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service, string adClientId, string customChannelId)
                    : base(service)
                {
                    AdClientId = adClientId;
                    CustomChannelId = customChannelId;
                    InitParameters();
                }


                /// <summary>Ad client which contains the custom channel.</summary>
                [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string AdClientId { get; private set; }

                /// <summary>Custom channel for which to list ad units.</summary>
                [Google.Apis.Util.RequestParameterAttribute("customChannelId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string CustomChannelId { get; private set; }

                /// <summary>Whether to include inactive ad units. Default: true.</summary>
                [Google.Apis.Util.RequestParameterAttribute("includeInactive", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<bool> IncludeInactive { get; set; }

                /// <summary>The maximum number of ad units to include in the response, used for paging.</summary>
                /// [minimum: 0]
                /// [maximum: 10000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>A continuation token, used to page through ad units. To retrieve the next page, set this
                /// parameter to the value of "nextPageToken" from the previous response.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "adclients/{adClientId}/customchannels/{customChannelId}/adunits"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "adClientId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "adClientId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "customChannelId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "customChannelId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "includeInactive", new Google.Apis.Discovery.Parameter
                        {
                            Name = "includeInactive",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }

        /// <summary>Get the specified custom channel from the specified ad client.</summary>
        /// <param name="adClientId">Ad client which contains the custom channel.</param>
        /// <param
        /// name="customChannelId">Custom channel to retrieve.</param>
        public virtual GetRequest Get(string adClientId, string customChannelId)
        {
            return new GetRequest(service, adClientId, customChannelId);
        }

        /// <summary>Get the specified custom channel from the specified ad client.</summary>
        public class GetRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.CustomChannel>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string adClientId, string customChannelId)
                : base(service)
            {
                AdClientId = adClientId;
                CustomChannelId = customChannelId;
                InitParameters();
            }


            /// <summary>Ad client which contains the custom channel.</summary>
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// <summary>Custom channel to retrieve.</summary>
            [Google.Apis.Util.RequestParameterAttribute("customChannelId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string CustomChannelId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "adclients/{adClientId}/customchannels/{customChannelId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "customChannelId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "customChannelId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>List all custom channels in the specified ad client for this AdSense account.</summary>
        /// <param name="adClientId">Ad client for which to list custom channels.</param>
        public virtual ListRequest List(string adClientId)
        {
            return new ListRequest(service, adClientId);
        }

        /// <summary>List all custom channels in the specified ad client for this AdSense account.</summary>
        public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.CustomChannels>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string adClientId)
                : base(service)
            {
                AdClientId = adClientId;
                InitParameters();
            }


            /// <summary>Ad client for which to list custom channels.</summary>
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// <summary>The maximum number of custom channels to include in the response, used for paging.</summary>
            /// [minimum: 0]
            /// [maximum: 10000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>A continuation token, used to page through custom channels. To retrieve the next page, set this
            /// parameter to the value of "nextPageToken" from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "adclients/{adClientId}/customchannels"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "metadata" collection of methods.</summary>
    public class MetadataResource
    {
        private const string Resource = "metadata";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public MetadataResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            dimensions = new DimensionsResource(service);
            metrics = new MetricsResource(service);

        }

        private readonly DimensionsResource dimensions;

        /// <summary>Gets the Dimensions resource.</summary>
        public virtual DimensionsResource Dimensions
        {
            get { return dimensions; }
        }

        /// <summary>The "dimensions" collection of methods.</summary>
        public class DimensionsResource
        {
            private const string Resource = "dimensions";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public DimensionsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>List the metadata for the dimensions available to this AdSense account.</summary>
            public virtual ListRequest List()
            {
                return new ListRequest(service);
            }

            /// <summary>List the metadata for the dimensions available to this AdSense account.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.Metadata>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service)
                    : base(service)
                {
                    InitParameters();
                }



                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "metadata/dimensions"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                }

            }
        }
        private readonly MetricsResource metrics;

        /// <summary>Gets the Metrics resource.</summary>
        public virtual MetricsResource Metrics
        {
            get { return metrics; }
        }

        /// <summary>The "metrics" collection of methods.</summary>
        public class MetricsResource
        {
            private const string Resource = "metrics";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public MetricsResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>List the metadata for the metrics available to this AdSense account.</summary>
            public virtual ListRequest List()
            {
                return new ListRequest(service);
            }

            /// <summary>List the metadata for the metrics available to this AdSense account.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.Metadata>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service)
                    : base(service)
                {
                    InitParameters();
                }



                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "metadata/metrics"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                }

            }
        }
    }

    /// <summary>The "reports" collection of methods.</summary>
    public class ReportsResource
    {
        private const string Resource = "reports";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public ReportsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;
            saved = new SavedResource(service);

        }

        private readonly SavedResource saved;

        /// <summary>Gets the Saved resource.</summary>
        public virtual SavedResource Saved
        {
            get { return saved; }
        }

        /// <summary>The "saved" collection of methods.</summary>
        public class SavedResource
        {
            private const string Resource = "saved";

            /// <summary>The service which this resource belongs to.</summary>
            private readonly Google.Apis.Services.IClientService service;

            /// <summary>Constructs a new resource.</summary>
            public SavedResource(Google.Apis.Services.IClientService service)
            {
                this.service = service;

            }


            /// <summary>Generate an AdSense report based on the saved report ID sent in the query parameters.</summary>
            /// <param name="savedReportId">The saved report to retrieve.</param>
            public virtual GenerateRequest Generate(string savedReportId)
            {
                return new GenerateRequest(service, savedReportId);
            }

            /// <summary>Generate an AdSense report based on the saved report ID sent in the query parameters.</summary>
            public class GenerateRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdsenseReportsGenerateResponse>
            {
                /// <summary>Constructs a new Generate request.</summary>
                public GenerateRequest(Google.Apis.Services.IClientService service, string savedReportId)
                    : base(service)
                {
                    SavedReportId = savedReportId;
                    InitParameters();
                }


                /// <summary>The saved report to retrieve.</summary>
                [Google.Apis.Util.RequestParameterAttribute("savedReportId", Google.Apis.Util.RequestParameterType.Path)]
                public virtual string SavedReportId { get; private set; }

                /// <summary>Optional locale to use for translating report output to a local language. Defaults to
                /// "en_US" if not specified.</summary>
                [Google.Apis.Util.RequestParameterAttribute("locale", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string Locale { get; set; }

                /// <summary>The maximum number of rows of report data to return.</summary>
                /// [minimum: 0]
                /// [maximum: 50000]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>Index of the first row of report data to return.</summary>
                /// [minimum: 0]
                /// [maximum: 5000]
                [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> StartIndex { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "generate"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "reports/{savedReportId}"; }
                }

                /// <summary>Initializes Generate parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "savedReportId", new Google.Apis.Discovery.Parameter
                        {
                            Name = "savedReportId",
                            IsRequired = true,
                            ParameterType = "path",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "locale", new Google.Apis.Discovery.Parameter
                        {
                            Name = "locale",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = @"[a-zA-Z_]+",
                        });
                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "startIndex", new Google.Apis.Discovery.Parameter
                        {
                            Name = "startIndex",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }

            /// <summary>List all saved reports in this AdSense account.</summary>
            public virtual ListRequest List()
            {
                return new ListRequest(service);
            }

            /// <summary>List all saved reports in this AdSense account.</summary>
            public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.SavedReports>
            {
                /// <summary>Constructs a new List request.</summary>
                public ListRequest(Google.Apis.Services.IClientService service)
                    : base(service)
                {
                    InitParameters();
                }


                /// <summary>The maximum number of saved reports to include in the response, used for paging.</summary>
                /// [minimum: 0]
                /// [maximum: 100]
                [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
                public virtual System.Nullable<int> MaxResults { get; set; }

                /// <summary>A continuation token, used to page through saved reports. To retrieve the next page, set
                /// this parameter to the value of "nextPageToken" from the previous response.</summary>
                [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
                public virtual string PageToken { get; set; }


                ///<summary>Gets the method name.</summary>
                public override string MethodName
                {
                    get { return "list"; }
                }

                ///<summary>Gets the HTTP method.</summary>
                public override string HttpMethod
                {
                    get { return "GET"; }
                }

                ///<summary>Gets the REST path.</summary>
                public override string RestPath
                {
                    get { return "reports/saved"; }
                }

                /// <summary>Initializes List parameter list.</summary>
                protected override void InitParameters()
                {
                    base.InitParameters();

                    RequestParameters.Add(
                        "maxResults", new Google.Apis.Discovery.Parameter
                        {
                            Name = "maxResults",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                    RequestParameters.Add(
                        "pageToken", new Google.Apis.Discovery.Parameter
                        {
                            Name = "pageToken",
                            IsRequired = false,
                            ParameterType = "query",
                            DefaultValue = null,
                            Pattern = null,
                        });
                }

            }
        }

        /// <summary>Generate an AdSense report based on the report request sent in the query parameters. Returns the
        /// result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.</summary>
        /// <param name="startDate">Start of the date range to report on in "YYYY-MM-DD" format, inclusive.</param>
        ///
        /// <param name="endDate">End of the date range to report on in "YYYY-MM-DD" format, inclusive.</param>
        public virtual GenerateRequest Generate(string startDate, string endDate)
        {
            return new GenerateRequest(service, startDate, endDate);
        }

        /// <summary>Generate an AdSense report based on the report request sent in the query parameters. Returns the
        /// result as JSON; to retrieve output in CSV format specify "alt=csv" as a query parameter.</summary>
        public class GenerateRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.AdsenseReportsGenerateResponse>
        {
            /// <summary>Constructs a new Generate request.</summary>
            public GenerateRequest(Google.Apis.Services.IClientService service, string startDate, string endDate)
                : base(service)
            {
                StartDate = startDate;
                EndDate = endDate;
                MediaDownloader = new Google.Apis.Download.MediaDownloader(service);
                InitParameters();
            }


            /// <summary>Start of the date range to report on in "YYYY-MM-DD" format, inclusive.</summary>
            [Google.Apis.Util.RequestParameterAttribute("startDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string StartDate { get; private set; }

            /// <summary>End of the date range to report on in "YYYY-MM-DD" format, inclusive.</summary>
            [Google.Apis.Util.RequestParameterAttribute("endDate", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string EndDate { get; private set; }

            /// <summary>Accounts upon which to report.</summary>
            [Google.Apis.Util.RequestParameterAttribute("accountId", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> AccountId { get; set; }

            /// <summary>Optional currency to use when reporting on monetary metrics. Defaults to the account's currency
            /// if not set.</summary>
            [Google.Apis.Util.RequestParameterAttribute("currency", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Currency { get; set; }

            /// <summary>Dimensions to base the report on.</summary>
            [Google.Apis.Util.RequestParameterAttribute("dimension", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> Dimension { get; set; }

            /// <summary>Filters to be run on the report.</summary>
            [Google.Apis.Util.RequestParameterAttribute("filter", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> Filter { get; set; }

            /// <summary>Optional locale to use for translating report output to a local language. Defaults to "en_US"
            /// if not specified.</summary>
            [Google.Apis.Util.RequestParameterAttribute("locale", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string Locale { get; set; }

            /// <summary>The maximum number of rows of report data to return.</summary>
            /// [minimum: 0]
            /// [maximum: 50000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>Numeric columns to include in the report.</summary>
            [Google.Apis.Util.RequestParameterAttribute("metric", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> Metric { get; set; }

            /// <summary>The name of a dimension or metric to sort the resulting report on, optionally prefixed with "+"
            /// to sort ascending or "-" to sort descending. If no prefix is specified, the column is sorted
            /// ascending.</summary>
            [Google.Apis.Util.RequestParameterAttribute("sort", Google.Apis.Util.RequestParameterType.Query)]
            public virtual Google.Apis.Util.Repeatable<string> Sort { get; set; }

            /// <summary>Index of the first row of report data to return.</summary>
            /// [minimum: 0]
            /// [maximum: 5000]
            [Google.Apis.Util.RequestParameterAttribute("startIndex", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> StartIndex { get; set; }

            /// <summary>Whether the report should be generated in the AdSense account's local timezone. If false
            /// default PST/PDT timezone will be used.</summary>
            [Google.Apis.Util.RequestParameterAttribute("useTimezoneReporting", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<bool> UseTimezoneReporting { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "generate"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "reports"; }
            }

            /// <summary>Initializes Generate parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "startDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startDate",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)",
                    });
                RequestParameters.Add(
                    "endDate", new Google.Apis.Discovery.Parameter
                    {
                        Name = "endDate",
                        IsRequired = true,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"\d{4}-\d{2}-\d{2}|(today|startOfMonth|startOfYear)(([\-\+]\d+[dwmy]){0,3}?)",
                    });
                RequestParameters.Add(
                    "accountId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "accountId",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "currency", new Google.Apis.Discovery.Parameter
                    {
                        Name = "currency",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"[a-zA-Z]+",
                    });
                RequestParameters.Add(
                    "dimension", new Google.Apis.Discovery.Parameter
                    {
                        Name = "dimension",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"[a-zA-Z_]+",
                    });
                RequestParameters.Add(
                    "filter", new Google.Apis.Discovery.Parameter
                    {
                        Name = "filter",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"[a-zA-Z_]+(==|=@).+",
                    });
                RequestParameters.Add(
                    "locale", new Google.Apis.Discovery.Parameter
                    {
                        Name = "locale",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"[a-zA-Z_]+",
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "metric", new Google.Apis.Discovery.Parameter
                    {
                        Name = "metric",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"[a-zA-Z_]+",
                    });
                RequestParameters.Add(
                    "sort", new Google.Apis.Discovery.Parameter
                    {
                        Name = "sort",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = @"(\+|-)?[a-zA-Z_]+",
                    });
                RequestParameters.Add(
                    "startIndex", new Google.Apis.Discovery.Parameter
                    {
                        Name = "startIndex",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "useTimezoneReporting", new Google.Apis.Discovery.Parameter
                    {
                        Name = "useTimezoneReporting",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

            /// <summary>Gets the media downloader.</summary>
            public Google.Apis.Download.IMediaDownloader MediaDownloader { get; private set; }

            /// <summary>Synchronously download the media into the given stream.</summary>
            public virtual void Download(System.IO.Stream stream)
            {
                MediaDownloader.Download(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream);
            }

            /// <summary>Asynchronously download the media into the given stream.</summary>
            public virtual System.Threading.Tasks.Task<Google.Apis.Download.IDownloadProgress> DownloadAsync(System.IO.Stream stream,
                System.Threading.CancellationToken cancellationToken)
            {
                return MediaDownloader.DownloadAsync(this.GenerateRequestUri(), stream, cancellationToken);
            }

        }
    }

    /// <summary>The "savedadstyles" collection of methods.</summary>
    public class SavedadstylesResource
    {
        private const string Resource = "savedadstyles";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public SavedadstylesResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>Get a specific saved ad style from the user's account.</summary>
        /// <param name="savedAdStyleId">Saved ad style to retrieve.</param>
        public virtual GetRequest Get(string savedAdStyleId)
        {
            return new GetRequest(service, savedAdStyleId);
        }

        /// <summary>Get a specific saved ad style from the user's account.</summary>
        public class GetRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.SavedAdStyle>
        {
            /// <summary>Constructs a new Get request.</summary>
            public GetRequest(Google.Apis.Services.IClientService service, string savedAdStyleId)
                : base(service)
            {
                SavedAdStyleId = savedAdStyleId;
                InitParameters();
            }


            /// <summary>Saved ad style to retrieve.</summary>
            [Google.Apis.Util.RequestParameterAttribute("savedAdStyleId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string SavedAdStyleId { get; private set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "get"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "savedadstyles/{savedAdStyleId}"; }
            }

            /// <summary>Initializes Get parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "savedAdStyleId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "savedAdStyleId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }

        /// <summary>List all saved ad styles in the user's account.</summary>
        public virtual ListRequest List()
        {
            return new ListRequest(service);
        }

        /// <summary>List all saved ad styles in the user's account.</summary>
        public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.SavedAdStyles>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service)
                : base(service)
            {
                InitParameters();
            }


            /// <summary>The maximum number of saved ad styles to include in the response, used for paging.</summary>
            /// [minimum: 0]
            /// [maximum: 10000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>A continuation token, used to page through saved ad styles. To retrieve the next page, set this
            /// parameter to the value of "nextPageToken" from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "savedadstyles"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }

    /// <summary>The "urlchannels" collection of methods.</summary>
    public class UrlchannelsResource
    {
        private const string Resource = "urlchannels";

        /// <summary>The service which this resource belongs to.</summary>
        private readonly Google.Apis.Services.IClientService service;

        /// <summary>Constructs a new resource.</summary>
        public UrlchannelsResource(Google.Apis.Services.IClientService service)
        {
            this.service = service;

        }


        /// <summary>List all URL channels in the specified ad client for this AdSense account.</summary>
        /// <param name="adClientId">Ad client for which to list URL channels.</param>
        public virtual ListRequest List(string adClientId)
        {
            return new ListRequest(service, adClientId);
        }

        /// <summary>List all URL channels in the specified ad client for this AdSense account.</summary>
        public class ListRequest : AdSenseBaseServiceRequest<Google.Apis.AdSense.v1_3.Data.UrlChannels>
        {
            /// <summary>Constructs a new List request.</summary>
            public ListRequest(Google.Apis.Services.IClientService service, string adClientId)
                : base(service)
            {
                AdClientId = adClientId;
                InitParameters();
            }


            /// <summary>Ad client for which to list URL channels.</summary>
            [Google.Apis.Util.RequestParameterAttribute("adClientId", Google.Apis.Util.RequestParameterType.Path)]
            public virtual string AdClientId { get; private set; }

            /// <summary>The maximum number of URL channels to include in the response, used for paging.</summary>
            /// [minimum: 0]
            /// [maximum: 10000]
            [Google.Apis.Util.RequestParameterAttribute("maxResults", Google.Apis.Util.RequestParameterType.Query)]
            public virtual System.Nullable<int> MaxResults { get; set; }

            /// <summary>A continuation token, used to page through URL channels. To retrieve the next page, set this
            /// parameter to the value of "nextPageToken" from the previous response.</summary>
            [Google.Apis.Util.RequestParameterAttribute("pageToken", Google.Apis.Util.RequestParameterType.Query)]
            public virtual string PageToken { get; set; }


            ///<summary>Gets the method name.</summary>
            public override string MethodName
            {
                get { return "list"; }
            }

            ///<summary>Gets the HTTP method.</summary>
            public override string HttpMethod
            {
                get { return "GET"; }
            }

            ///<summary>Gets the REST path.</summary>
            public override string RestPath
            {
                get { return "adclients/{adClientId}/urlchannels"; }
            }

            /// <summary>Initializes List parameter list.</summary>
            protected override void InitParameters()
            {
                base.InitParameters();

                RequestParameters.Add(
                    "adClientId", new Google.Apis.Discovery.Parameter
                    {
                        Name = "adClientId",
                        IsRequired = true,
                        ParameterType = "path",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "maxResults", new Google.Apis.Discovery.Parameter
                    {
                        Name = "maxResults",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
                RequestParameters.Add(
                    "pageToken", new Google.Apis.Discovery.Parameter
                    {
                        Name = "pageToken",
                        IsRequired = false,
                        ParameterType = "query",
                        DefaultValue = null,
                        Pattern = null,
                    });
            }

        }
    }
}

namespace Google.Apis.AdSense.v1_3.Data
{    

    public class Account : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Unique identifier of this account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is, in this case adsense#account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Name of this account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>Whether this account is premium.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("premium")]
        public virtual System.Nullable<bool> Premium { get; set; } 

        /// <summary>Sub accounts of the this account.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("subAccounts")]
        public virtual System.Collections.Generic.IList<Account> SubAccounts { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class Accounts : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of this response for caching purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The accounts returned in this list response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Account> Items { get; set; } 

        /// <summary>Kind of list this is, in this case adsense#accounts.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Continuation token used to page through accounts. To retrieve the next page of results, set the
        /// next request's "pageToken" value to this.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    public class AdClient : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Whether this ad client is opted in to ARC.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("arcOptIn")]
        public virtual System.Nullable<bool> ArcOptIn { get; set; } 

        /// <summary>Unique identifier of this ad client.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is, in this case adsense#adClient.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>This ad client's product code, which corresponds to the PRODUCT_CODE report dimension.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("productCode")]
        public virtual string ProductCode { get; set; } 

        /// <summary>Whether this ad client supports being reported on.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("supportsReporting")]
        public virtual System.Nullable<bool> SupportsReporting { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class AdClients : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of this response for caching purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The ad clients returned in this list response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<AdClient> Items { get; set; } 

        /// <summary>Kind of list this is, in this case adsense#adClients.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Continuation token used to page through ad clients. To retrieve the next page of results, set the
        /// next request's "pageToken" value to this.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    public class AdCode : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The ad code snippet.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("adCode")]
        public virtual string AdCodeValue { get; set; } 

        /// <summary>Kind this is, in this case adsense#adCode.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class AdStyle : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The colors which are included in the style. These are represented as six hexadecimal characters,
        /// similar to HTML color codes, but without the leading hash.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("colors")]
        public virtual AdStyle.ColorsData Colors { get; set; } 

        /// <summary>The style of the corners in the ad (deprecated: never populated, ignored).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("corners")]
        public virtual string Corners { get; set; } 

        /// <summary>The font which is included in the style.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("font")]
        public virtual AdStyle.FontData Font { get; set; } 

        /// <summary>Kind this is, in this case adsense#adStyle.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>The colors which are included in the style. These are represented as six hexadecimal characters,
        /// similar to HTML color codes, but without the leading hash.</summary>
        public class ColorsData
        {
            /// <summary>The color of the ad background.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("background")]
            public virtual string Background { get; set; } 

            /// <summary>The color of the ad border.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("border")]
            public virtual string Border { get; set; } 

            /// <summary>The color of the ad text.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("text")]
            public virtual string Text { get; set; } 

            /// <summary>The color of the ad title.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("title")]
            public virtual string Title { get; set; } 

            /// <summary>The color of the ad url.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("url")]
            public virtual string Url { get; set; } 

        }    

        /// <summary>The font which is included in the style.</summary>
        public class FontData
        {
            /// <summary>The family of the font.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("family")]
            public virtual string Family { get; set; } 

            /// <summary>The size of the font.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("size")]
            public virtual string Size { get; set; } 

        }
    }    

    public class AdUnit : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Identity code of this ad unit, not necessarily unique across ad clients.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>Settings specific to content ads (AFC) and highend mobile content ads (AFMC -
        /// deprecated).</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("contentAdsSettings")]
        public virtual AdUnit.ContentAdsSettingsData ContentAdsSettings { get; set; } 

        /// <summary>Custom style information specific to this ad unit.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("customStyle")]
        public virtual AdStyle CustomStyle { get; set; } 

        /// <summary>Settings specific to feed ads (AFF) - deprecated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("feedAdsSettings")]
        public virtual AdUnit.FeedAdsSettingsData FeedAdsSettings { get; set; } 

        /// <summary>Unique identifier of this ad unit. This should be considered an opaque identifier; it is not safe
        /// to rely on it being in any particular format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is, in this case adsense#adUnit.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Settings specific to WAP mobile content ads (AFMC) - deprecated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("mobileContentAdsSettings")]
        public virtual AdUnit.MobileContentAdsSettingsData MobileContentAdsSettings { get; set; } 

        /// <summary>Name of this ad unit.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>ID of the saved ad style which holds this ad unit's style information.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("savedStyleId")]
        public virtual string SavedStyleId { get; set; } 

        /// <summary>Status of this ad unit. Possible values are: NEW: Indicates that the ad unit was created within the
        /// last seven days and does not yet have any activity associated with it.
        ///
        /// ACTIVE: Indicates that there has been activity on this ad unit in the last seven days.
        ///
        /// INACTIVE: Indicates that there has been no activity on this ad unit in the last seven days.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("status")]
        public virtual string Status { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>Settings specific to content ads (AFC) and highend mobile content ads (AFMC -
        /// deprecated).</summary>
        public class ContentAdsSettingsData
        {
            /// <summary>The backup option to be used in instances where no ad is available.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("backupOption")]
            public virtual ContentAdsSettingsData.BackupOptionData BackupOption { get; set; } 

            /// <summary>Size of this ad unit.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("size")]
            public virtual string Size { get; set; } 

            /// <summary>Type of this ad unit.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; } 

            

            /// <summary>The backup option to be used in instances where no ad is available.</summary>
            public class BackupOptionData
            {
                /// <summary>Color to use when type is set to COLOR.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("color")]
                public virtual string Color { get; set; } 

                /// <summary>Type of the backup option. Possible values are BLANK, COLOR and URL.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("type")]
                public virtual string Type { get; set; } 

                /// <summary>URL to use when type is set to URL.</summary>
                [Newtonsoft.Json.JsonPropertyAttribute("url")]
                public virtual string Url { get; set; } 

            }
        }    

        /// <summary>Settings specific to feed ads (AFF) - deprecated.</summary>
        public class FeedAdsSettingsData
        {
            /// <summary>The position of the ads relative to the feed entries.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("adPosition")]
            public virtual string AdPosition { get; set; } 

            /// <summary>The frequency at which ads should appear in the feed (i.e. every N entries).</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("frequency")]
            public virtual System.Nullable<int> Frequency { get; set; } 

            /// <summary>The minimum length an entry should be in order to have attached ads.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("minimumWordCount")]
            public virtual System.Nullable<int> MinimumWordCount { get; set; } 

            /// <summary>The type of ads which should appear.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; } 

        }    

        /// <summary>Settings specific to WAP mobile content ads (AFMC) - deprecated.</summary>
        public class MobileContentAdsSettingsData
        {
            /// <summary>The markup language to use for this ad unit.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("markupLanguage")]
            public virtual string MarkupLanguage { get; set; } 

            /// <summary>The scripting language to use for this ad unit.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("scriptingLanguage")]
            public virtual string ScriptingLanguage { get; set; } 

            /// <summary>Size of this ad unit.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("size")]
            public virtual string Size { get; set; } 

            /// <summary>Type of this ad unit.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; } 

        }
    }    

    public class AdUnits : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of this response for caching purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The ad units returned in this list response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<AdUnit> Items { get; set; } 

        /// <summary>Kind of list this is, in this case adsense#adUnits.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Continuation token used to page through ad units. To retrieve the next page of results, set the
        /// next request's "pageToken" value to this.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    public class AdsenseReportsGenerateResponse : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The averages of the report. This is the same length as any other row in the report; cells
        /// corresponding to dimension columns are empty.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("averages")]
        public virtual System.Collections.Generic.IList<string> Averages { get; set; } 

        /// <summary>The header information of the columns requested in the report. This is a list of headers; one for
        /// each dimension in the request, followed by one for each metric in the request.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("headers")]
        public virtual System.Collections.Generic.IList<AdsenseReportsGenerateResponse.HeadersData> Headers { get; set; } 

        /// <summary>Kind this is, in this case adsense#report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The output rows of the report. Each row is a list of cells; one for each dimension in the request,
        /// followed by one for each metric in the request. The dimension cells contain strings, and the metric cells
        /// contain numbers.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("rows")]
        public virtual System.Collections.Generic.IList<System.Collections.Generic.IList<string>> Rows { get; set; } 

        /// <summary>The total number of rows matched by the report request. Fewer rows may be returned in the response
        /// due to being limited by the row count requested or the report row limit.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totalMatchedRows")]
        public virtual System.Nullable<long> TotalMatchedRows { get; set; } 

        /// <summary>The totals of the report. This is the same length as any other row in the report; cells
        /// corresponding to dimension columns are empty.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("totals")]
        public virtual System.Collections.Generic.IList<string> Totals { get; set; } 

        /// <summary>Any warnings associated with generation of the report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("warnings")]
        public virtual System.Collections.Generic.IList<string> Warnings { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        public class HeadersData
        {
            /// <summary>The currency of this column. Only present if the header type is METRIC_CURRENCY.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("currency")]
            public virtual string Currency { get; set; } 

            /// <summary>The name of the header.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("name")]
            public virtual string Name { get; set; } 

            /// <summary>The type of the header; one of DIMENSION, METRIC_TALLY, METRIC_RATIO, or
            /// METRIC_CURRENCY.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("type")]
            public virtual string Type { get; set; } 

        }
    }    

    public class Alert : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Unique identifier of this alert. This should be considered an opaque identifier; it is not safe to
        /// rely on it being in any particular format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is, in this case adsense#alert.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The localized alert message.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("message")]
        public virtual string Message { get; set; } 

        /// <summary>Severity of this alert. Possible values: INFO, WARNING, SEVERE.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("severity")]
        public virtual string Severity { get; set; } 

        /// <summary>Type of this alert. Possible values: SELF_HOLD, MIGRATED_TO_BILLING3, ADDRESS_PIN_VERIFICATION,
        /// PHONE_PIN_VERIFICATION, CORPORATE_ENTITY, GRAYLISTED_PUBLISHER, API_HOLD.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("type")]
        public virtual string Type { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class Alerts : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The alerts returned in this list response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<Alert> Items { get; set; } 

        /// <summary>Kind of list this is, in this case adsense#alerts.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class CustomChannel : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Code of this custom channel, not necessarily unique across ad clients.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("code")]
        public virtual string Code { get; set; } 

        /// <summary>Unique identifier of this custom channel. This should be considered an opaque identifier; it is not
        /// safe to rely on it being in any particular format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is, in this case adsense#customChannel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Name of this custom channel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The targeting information of this custom channel, if activated.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("targetingInfo")]
        public virtual CustomChannel.TargetingInfoData TargetingInfo { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
        

        /// <summary>The targeting information of this custom channel, if activated.</summary>
        public class TargetingInfoData
        {
            /// <summary>The name used to describe this channel externally.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("adsAppearOn")]
            public virtual string AdsAppearOn { get; set; } 

            /// <summary>The external description of the channel.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("description")]
            public virtual string Description { get; set; } 

            /// <summary>The locations in which ads appear. (Only valid for content and mobile content ads
            /// (deprecated)). Acceptable values for content ads are: TOP_LEFT, TOP_CENTER, TOP_RIGHT, MIDDLE_LEFT,
            /// MIDDLE_CENTER, MIDDLE_RIGHT, BOTTOM_LEFT, BOTTOM_CENTER, BOTTOM_RIGHT, MULTIPLE_LOCATIONS. Acceptable
            /// values for mobile content ads (deprecated) are: TOP, MIDDLE, BOTTOM, MULTIPLE_LOCATIONS.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("location")]
            public virtual string Location { get; set; } 

            /// <summary>The language of the sites ads will be displayed on.</summary>
            [Newtonsoft.Json.JsonPropertyAttribute("siteLanguage")]
            public virtual string SiteLanguage { get; set; } 

        }
    }    

    public class CustomChannels : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of this response for caching purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The custom channels returned in this list response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<CustomChannel> Items { get; set; } 

        /// <summary>Kind of list this is, in this case adsense#customChannels.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Continuation token used to page through custom channels. To retrieve the next page of results, set
        /// the next request's "pageToken" value to this.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    public class Metadata : Google.Apis.Requests.IDirectResponseSchema
    {
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<ReportingMetadataEntry> Items { get; set; } 

        /// <summary>Kind of list this is, in this case adsense#metadata.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class ReportingMetadataEntry : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>For metrics this is a list of dimension IDs which the metric is compatible with, for dimensions it
        /// is a list of compatibility groups the dimension belongs to.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("compatibleDimensions")]
        public virtual System.Collections.Generic.IList<string> CompatibleDimensions { get; set; } 

        /// <summary>The names of the metrics the dimension or metric this reporting metadata entry describes is
        /// compatible with.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("compatibleMetrics")]
        public virtual System.Collections.Generic.IList<string> CompatibleMetrics { get; set; } 

        /// <summary>Unique identifier of this reporting metadata entry, corresponding to the name of the appropriate
        /// dimension or metric.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is, in this case adsense#reportingMetadataEntry.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The names of the dimensions which the dimension or metric this reporting metadata entry describes
        /// requires to also be present in order for the report to be valid. Omitting these will not cause an error or
        /// warning, but may result in data which cannot be correctly interpreted.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requiredDimensions")]
        public virtual System.Collections.Generic.IList<string> RequiredDimensions { get; set; } 

        /// <summary>The names of the metrics which the dimension or metric this reporting metadata entry describes
        /// requires to also be present in order for the report to be valid. Omitting these will not cause an error or
        /// warning, but may result in data which cannot be correctly interpreted.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("requiredMetrics")]
        public virtual System.Collections.Generic.IList<string> RequiredMetrics { get; set; } 

        /// <summary>The codes of the projects supported by the dimension or metric this reporting metadata entry
        /// describes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("supportedProducts")]
        public virtual System.Collections.Generic.IList<string> SupportedProducts { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class SavedAdStyle : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>The AdStyle itself.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("adStyle")]
        public virtual AdStyle AdStyle { get; set; } 

        /// <summary>Unique identifier of this saved ad style. This should be considered an opaque identifier; it is not
        /// safe to rely on it being in any particular format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is, in this case adsense#savedAdStyle.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>The user selected name of this SavedAdStyle.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class SavedAdStyles : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of this response for caching purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The saved ad styles returned in this list response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<SavedAdStyle> Items { get; set; } 

        /// <summary>Kind of list this is, in this case adsense#savedAdStyles.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Continuation token used to page through ad units. To retrieve the next page of results, set the
        /// next request's "pageToken" value to this.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    public class SavedReport : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Unique identifier of this saved report.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is, in this case adsense#savedReport.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>This saved report's name.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("name")]
        public virtual string Name { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class SavedReports : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of this response for caching purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The saved reports returned in this list response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<SavedReport> Items { get; set; } 

        /// <summary>Kind of list this is, in this case adsense#savedReports.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Continuation token used to page through saved reports. To retrieve the next page of results, set
        /// the next request's "pageToken" value to this.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }    

    public class UrlChannel : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>Unique identifier of this URL channel. This should be considered an opaque identifier; it is not
        /// safe to rely on it being in any particular format.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("id")]
        public virtual string Id { get; set; } 

        /// <summary>Kind of resource this is, in this case adsense#urlChannel.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>URL Pattern of this URL channel. Does not include "http://" or "https://". Example:
        /// www.example.com/home</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("urlPattern")]
        public virtual string UrlPattern { get; set; } 

        /// <summary>The ETag of the item.</summary>
        public virtual string ETag { get; set; }
    }    

    public class UrlChannels : Google.Apis.Requests.IDirectResponseSchema
    {
        /// <summary>ETag of this response for caching purposes.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("etag")]
        public virtual string ETag { get; set; } 

        /// <summary>The URL channels returned in this list response.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("items")]
        public virtual System.Collections.Generic.IList<UrlChannel> Items { get; set; } 

        /// <summary>Kind of list this is, in this case adsense#urlChannels.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("kind")]
        public virtual string Kind { get; set; } 

        /// <summary>Continuation token used to page through URL channels. To retrieve the next page of results, set the
        /// next request's "pageToken" value to this.</summary>
        [Newtonsoft.Json.JsonPropertyAttribute("nextPageToken")]
        public virtual string NextPageToken { get; set; } 

    }
}
